package com.qidian.mespro.controller;

import com.qidian.mespro.service.BomService;
import com.qidianit.mes.pojo.Bom;
import com.qidianit.mes.pojo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ author: 周晓轩
 * @ company 起点编程
 * @ time: 2025/9/23 - 20:00
 * @ Description:
 */
@RestController
@RequestMapping("/bom")
public class BomController {

    @Autowired
    private BomService bomService;

    @GetMapping("/list")
    public Result<List<Bom>> getBomListByProductionOrderCode(@RequestParam(required = false)String productionOrderCode){
        return bomService.getBomListByProductionOrderCode(productionOrderCode);
    }
}
